/**
 * Copyright (c) 2014 zhenrongbao.com, Inc. All Rights Reserved
 * @author: jiangshuguang
 * @Date  : 15-1-1
 * @Time  : 下午5:06
 * @brief :
 */
(function () {

    document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
        WeixinJSBridge.on('menu:share:timeline', function(argv){
            $.get('/index/jiangtestapi',{type:'timeline'},function(){
                 alert('timeline');
            },'json');
        });

        WeixinJSBridge.on('menu:share:appmessage', function(argv){

            WeixinJSBridge.invoke('shareTimeline',{
                "appid":'wxba62c5e4899dd28a',
                "img_url": 'https://www.zhenrongbao.com/static/index/widget/header/image/logo_1bec192.png',
                "img_width": "640",
                "img_height": "640",
                "link":'https://www.zhenrongbao.com/',
                "desc": '真融宝分享',
                "title":'真融宝分享'
            }, function(res) {
                $.get('/index/jiangtestapi',{type:'appmessage'},function(){
                    alert('appmessage');
                },'json');

            });

        });

    });


})();